<?php

/**
 * Mailing form.
 *
 * @package    form
 * @subpackage Mailing
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class MailingForm extends BaseMailingForm
{
  	public function configure()
  	{
  		parent::configure();
		
  		$this->widgetSchema['nm_mailing'] = new sfWidgetFormInput(
  			array(),
  			array('size' => '70')
  		);
  		
  		$this->widgetSchema['ds_mailing'] = new sfWidgetFormTextarea(
			array(),
			array('id' => 'tinymce')
        );
        
        $options = array('0'=>'Sim', '1'=>'Não');
		$this->widgetSchema['st_mailing'] = new sfWidgetFormChoice(
			array('choices'=>$options, 'expanded'=>true, 'multiple'=>false)
		);
		
		$this->widgetSchema['dt_envio'] = new sfWidgetFormInput(
			array(),
			array('size' => 15, 'maxlenght' => 10, 'class' => 'is_date_picker')
		);
		$this->validatorSchema['dt_envio'] = new sfValidatori18nDate(
			array('required' => false)
		);
		
		$this->widgetSchema['created_at'] = new sfWidgetFormInputHidden();
		$this->widgetSchema['updated_at'] = new sfWidgetFormInputHidden();
  		
  		$this->widgetSchema->setLabels(array(
  		      	'id_mailing' => 'ID#',
		      	'nm_mailing' => 'Nome',
		      	'ds_mailing' => 'Conteudo',
		      	'st_mailing' => 'Status',
		      	'dt_envio'   => 'Data de envio',
		      	'created_at' => 'Criado em',
		      	'updated_at' => 'Atualizado em',
		      	'deleted' 	 => 'Deletado',
  				'mailing_group_list' => 'Lista de grupos'
		));
  	}
}